home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / minix / up1510b.tgz / up1510b / src / tools / Makefile < prev    next >
Makefile  |  1990-07-15  |  1KB  |  63 lines

  1. CFLAGS    = -O
  2. SRC1    = build.c boot.s type.s init.c menu.c
  3. SRC2    = outmix.h fakeunix.c getstruc.c putstruc.c
  4.  
  5. PARTS    = ../kernel/kernel.mix ../mm/mm.mix ../fs/fs.mix init.mix menu.mix
  6. ALL    = minix.img
  7. LD    = /usr/lib/ld
  8. CV    = /usr/lib/cv
  9. l    = /usr/lib
  10.  
  11.  
  12. all:    $(ALL)
  13.  
  14. cp cmp:    all
  15.  
  16. clean:
  17.     rm -f *.o
  18.  
  19. clobber:
  20.     rm -f $(ALL) build boot_?d type_?d minix_?d init.mix menu.mix
  21.  
  22. build:    build.c outmix.h getstruc.c putstruc.c
  23.     cc $(CFLAGS) -DATARI_ST build.c -o $@
  24.  
  25. minix.img:    build boot_fd $(PARTS)
  26.     ./build boot_fd $(PARTS) $@
  27.  
  28. minix_fd:    build boot_fd $(PARTS)
  29.     ./build boot_fd $(PARTS) $@
  30.  
  31. minix_dd:    build boot_dd $(PARTS)
  32.     ./build boot_dd $(PARTS) $@
  33.  
  34. type_fd type_dd:    type.s
  35.     cp type.s $@.s
  36.     $(CC) $(CFLAGS) -DACK -D$@ -c $@.s
  37.     $(LD) -c -o $@.out $@.o
  38.     $(CV) =510 $@.out $@.mix
  39.     dd if=$@.s of=$@.tmp bs=1 count=1 seek=512
  40.     { \
  41.         dd if=$@.mix bs=1 skip=32; \
  42.         dd if=$@.tmp; \
  43.     } | dd obs=1b | dd of=$@ count=1
  44.     rm -f $@.s $@.o $@.out $@.mix $@.tmp
  45.  
  46. boot_fd boot_dd:    boot.s
  47.     cp boot.s $@.s
  48.     $(CC) $(CFLAGS) -DACK -D$@ -c $@.s
  49.     $(LD) -s -c -o $@.out $@.o
  50.     $(CV) =510 $@.out $@.mix
  51.     dd if=$@.mix of=$@ bs=1 skip=32
  52.     rm -f $@.s $@.o $@.out $@.mix
  53.  
  54. init.mix:    init.o $l/head.o $l/libc.a $l/end.o
  55.     $(LD) -c -o init.out $l/head.o init.o $l/libc.a $l/end.o
  56.     $(CV) init.out $@
  57.     rm -f init.out
  58.  
  59. menu.mix:    menu.o $l/head.o $l/libc.a $l/end.o
  60.     $(LD) -c -o menu.out $l/head.o menu.o $l/libc.a $l/end.o
  61.     $(CV) menu.out $@
  62.     rm -f menu.out
  63.